package com.monkeygroup.mygoplus.view.home.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.monkeygroup.mygoplus.R;
import com.monkeygroup.mygoplus.base.BaseActivity;

/**
 * 海外房產
 * Created by cumt on 2017/6/8.
 */

public class AbroadThingActivity extends BaseActivity implements View.OnClickListener {

    public static void gotoActivity(Activity activity) {
        Intent intent = new Intent(activity,
                AbroadThingActivity.class);

        activity.startActivity(intent);
    }
    @Override
    public void onClick(View v) {

    }

    @Override
    public void setContentView() {
        setContentView(R.layout.activity_abroad);
    }

    @Override
    public void initView() {

        String url = "http://www.mygo.com/acts/international";
        ImageView imgBack = (ImageView) findViewById(R.id.img_back);
        TextView txtTitle = (TextView) findViewById(R.id.txt_title);
        txtTitle.setText("海外房產");

        imgBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        WebView webView = (WebView) findViewById(R.id.web_view);
      //  webView.loadUrl("http://www.mygo.com/acts/international");

        WebSettings settings = webView.getSettings();

        settings.setUseWideViewPort(true);
        settings.setLoadWithOverviewMode(true);

//        settings.setJavaScriptEnabled(true);
//        settings.setAllowContentAccess(true);
//        settings.setAppCacheEnabled(false);
//        settings.setBuiltInZoomControls(false);
//        settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
        webView.loadUrl(url);


//        webView.loadDataWithBaseURL(null,
//                "http://www.mygo.com/acts/international", "text/html",
//                "utf-8", null);
//        webView.setVerticalScrollBarEnabled(true);
//        webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
        //图片不超出屏幕
      //  webView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
    }

    @Override
    public void setListener() {

    }

    @Override
    public void doEvent() {



    }
}
